var http=require('http');
var contador=0;

http.createServer(function (req, res) {
	contador ++;
	res.writeHead(200, {'Content-Type': 'text/html'});
	res.end('<HTML>\n<HEAD>\n<TITLE>Hola, mundo!</TITLE>\n</HEAD>\n<BODY>\n<H1>Hola, mundo!\nNumero de visitas: '+contador+'</H1>\n</BODY>\n</HTML>\n');
}).listen(8080, '127.0.0.1');

console.log('Server running at http://127.0.0.1:8080/');
